/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package modeles.servicesClient;

import java.util.List;
import javax.ws.rs.core.GenericType;
import modeles.Rayon;

/**
 * Jersey REST client generated for REST resource:RayonFacadeREST [rayon]<br>
 * USAGE:
 * <pre>
 * ServicesRayons client = new ServicesRayons();
 * Object response = client.XXX(...);
 * // do whatever with response
 * client.close();
 * </pre>
 *
 * @author Fred
 */
public class ServicesRayons extends Services {

    public ServicesRayons() {
        super("rayon");
    }

    public List<Rayon> getRayons() {
        return (List<Rayon>) super.findAll(new GenericType<List<Rayon>>() {
        });
    }

    public boolean ajouterRayon(Rayon rayon) {
        return super.create(rayon);
    }

    public Rayon trouverRayon(String id) {
        return super.findById(Rayon.class, id);
    }

    public boolean modifierRayon(Rayon rayon, String id) {
        return super.edit(rayon, id);
    }

    public Integer supprimerRayon(String id) {
        return super.remove(id);
    }
}
